import { request } from '@ruifox-cms/utils'

// 删除内容
export function contentDelete(data) {
    return request({
        url: '/content/delete',
        method: 'delete',
        data
    })
}
// 内容置顶
export function contentTop(data) {
    return request({
        url: '/content/top',
        method: 'post',
        data
    })
}
// 上锁
export function contentLock(data) {
    return request({
        url: '/content/lock',
        method: 'post',
        data
    })
}
// 解锁
export function contentUnlock(data) {
    return request({
        url: '/content/unlock',
        method: 'post',
        data
    })
}
// 收藏
export function contentCollect(data){
    return request({
        url: '/content/collect',
        method: 'post',
        data
    })
}
// 取消收藏
export function contentCancelCollect(data){
    return request({
        url: '/content/cancelCollect',
        method: 'post',
        data
    })
}
// 获取模板列表
export function getTemplates(params) {
    return request({
        url: '/content/templates',
        method: 'get',
        params
    })
}
// 获取模板详情
export function getTemplateDetail(params) {
    return request({
        url: '/content/templateDetail',
        method: 'get',
        params
    })
}
// 修改模板
export function editTemplate(data) {
    return request({
        url: '/content/editTemplate',
        method: 'post',
        data
    })
}
// 删除模板
export function deleteTemplate(data) {
    return request({
        url: 'content/deleteTemplate',
        method: 'delete',
        data
    })
}
// 添加模板
export function addTemplate(data) {
    return request({
        url: '/content/addTemplate',
        method: 'post',
        data
    })
}
// 获取素材库图片
export function getMaterial() {
    return request({
        url: '/content/getMaterial',
        method: 'get'
    })
}
// 获取素材库视频
export function getVideoMaterial() {
    return request({
        url: '/content/getVideoMaterial',
        method: 'get'
    })
}
// 获取素材库附件
export function getFilePage(params) {
    return request({
        url: '/content/fileList',
        method: 'get',
        params
    })
}
// 提交视频上传表单
export function submitVideo(data) {
    return request({
        url: '/content/videoUpload/submitVideo',
        method: 'post',
        data
    })
}
// 上传回调
export function uploadCallback(data) {
    return request({
        url: '/content/uploadCallback',
        method: 'post',
        data
    })
}
// 获取模板字段
export function getFields(params) {
    return request({
        url: '/content/fields',
        method: 'get',
        params
    })
}
// 获取用户栏目树
export function getUserCategory(params) {
    return request({
        url: '/content/getUserCategory',
        method: 'get',
        params
    })
}
// 获取科室栏目树
export function getUserDepart(params) {
    return request({
        url: '/content/getUserDepart',
        method: 'get',
        params
    })
}
// 获取常用栏目树
export function getCommonCategory(params) {
    return request({
        url: '/content/getCommonCategory',
        method: 'get',
        params
    })
}
// 编辑常用栏目
export function editCommonCategory(data) {
    return request({
        url: '/content/editCommonCategory',
        method: 'post',
        data
    })
}
//获取SEO摘要
export function getSeoSummary(data) {
    return request({
        url: '/content/getSeoSummary',
        method: 'post',
        data
    })
}
//获取关键词
export function grabKeywords(data) {
    return request({
        url: '/content/grabKeywords',
        method: 'post',
        data
    })
}
// 获取发布的表单
export function getReleaseForm(params) {
    return request({
        url: '/content/releaseForm',
        method: 'get',
        params
    })
}
// 获取栏目详细信息
export function getCategoryDetail(params) {
    return request({
        url: '/content/getCategoryDetail',
        method: 'get',
        params
    })
}
// 获取模型列表
export function getModelList() {
    return request({
        url: '/content/getModelList',
        method: 'get'
    })
}
// 获取转向链接
export function getLinkList() {
    return request({
        url: '/content/getLinkList',
        method: 'get'
    })
}
// 获取相关数据
export function getRelatedList() {
    return request({
        url: '/content/getRelatedList',
        method: 'get'
    })
}

// 获取素材库附件
export function getFilesMaterial() {
    return request({
        url: '/content/getFilesMaterial',
        method: 'get'
    })
}
// 发布内容
export function addContent(data) {
    return request({
        url: '/content/addContent',
        method: 'post',
        data
    })
}
// 修改内容
export function editContent(data) {
    return request({
        url: '/content/editContent',
        method: 'post',
        data
    })
}

// 发布草稿
export function addDraft(data) {
    return request({
        url: '/content/addDraft',
        method: 'post',
        data
    })
}
// 编辑草稿
export function editDraft(data) {
    return request({
        url: '/content/editDraft',
        method: 'post',
        data
    })
}

// 获取单页数据
export function getPageData(params) {
    return request({
        url: '/content/getPageData',
        method: 'get',
        params
    })
}
// 清空单页数据
export function deletePageData(data) {
    return request({
        url: '/content/deletePageData',
        method: 'post',
        data
    })
}
// 添加单页数据
export function addPageData(data) {
    return request({
        url: '/content/addPageData',
        method: 'post',
        data
    })
}
// 修改单页数据
export function editPageData(data) {
    return request({
        url: '/content/editPageData',
        method: 'post',
        data
    })
}
// 获取搜索字段
export function getSearchFields(params) {
    return request({
        url: '/content/getSearchFields',
        method: 'get',
        params
    })
}
// 查询相关内容
export function searchLinkTitle(params) {
    return request({
        url: '/content/titleCheck',
        method: 'get',
        params
    })
}
// 内容导入
export function importContent(data) {
    return request({
        url: '/content/importContent',
        method: 'post',
        data
    })
}
// 获取上传地址
export function getUploadUrl(params) {
    return request({
        url: '/auth/system/getUploadUrl',
        method: 'get',
        params
    })
}
// 网络图片生成
export function checkImages(data) {
    return request({
        url: '/content/imageUpload/checkImages',
        method: 'post',
        data
    })
}
// 网络视频生成
export function checkVideos(data) {
    return request({
        url: '/content/imageUpload/checkVideos',
        method: 'post',
        data
    })
}
// 获取退稿箱列表
export function getRejectList(params) {
    return request({
        url: '/content/rejectList',
        method: 'get',
        params
    })
}
// 获取草稿箱列表
export function getDraftList(params) {
    return request({
        url: '/content/draftList',
        method: 'get',
        params
    })
}
// 删除草稿箱内容
export function draftDelete(data) {
    return request({
        url: '/content/draftDelete',
        method: 'delete',
        data
    })
}
// 获取回收站列表
export function getRecycleList(params) {
    return request({
        url: '/content/recycleList',
        method: 'get',
        params
    })
}
// 删除回收站内容
export function recycleDelete(data) {
    return request({
        url: '/content/recycleDelete',
        method: 'delete',
        data
    })
}
// 回收站恢复
export function recoverContent(data) {
    return request({
        url: '/content/recoverContent',
        method: 'post',
        data
    })
}
// 归档
export function archiveArticle(data){
    return request({
        url: '/content/archiveArticle',
        method: 'post',
        data
    })
}
// 获取归档内容
export function getArchivedList(params) {
    return request({
        url: '/content/archivedList',
        method: 'get',
        params
    })
}
// 回复归档内容
export function archivedRecover(data) {
    return request({
        url: '/content/archivedRecover',
        method: 'post',
        data
    })
}
// 删除归档内容
export function archivedDelete(data) {
    return request({
        url: '/content/archivedDelete',
        method: 'delete',
        data
    })
}
// 获取撤稿箱内容
export function getRevokeList(params) {
    return request({
        url: '/content/revokeList',
        method: 'get',
        params
    })
}
// 恢复撤稿箱内容
export function revokeRecover(data) {
    return request({
        url: '/content/recoverRevoke',
        method: 'post',
        data
    })
}
// 预览已发布内容
export function previewById(data) {
    return request({
        url: '/content/previewById',
        method: 'post',
        data
    })
}
// 获取待审核文章
export function getUnderReview(params) {
    return request({
        url: '/content/getUnderReview',
        method: 'get',
        params
    })
}

// 内容获取内容
/*
* model_id: 模型id
* catid: 栏目id
* form_content: 表单内容
* */
export function previewByContent(data) {
    return request({
        url: '/content/previewByContent',
        method: 'post',
        data
    })
}
// 内容排序
export function contentListOrder(data) {
    return request({
        url: '/content/listorder',
        method: 'post',
        data
    })
}
// 获取可排序字段
export function getSortFields(params) {
    return request({
        url: '/content/getSortFields',
        method: 'get',
        params
    })
}

// 撤稿
export function revokeArticle(data){
    return request({
        url: '/content/rejectArticle',
        method: 'post',
        data
    })
}
// 撤回
export function recallArticle(data){
    return request({
        url: '/content/recallArticle',
        method: 'post',
        data
    })
}
// 下线
export function offlineArticle(data){
    return request({
        url: '/content/offlineArticle',
        method: 'post',
        data
    })
}
// 获取我的草稿
export function getMyDraftList(params){
    return request({
        url: '/content/myDraftList',
        method: 'get',
        params
    })
}
// 获取我的撤稿
export function getMyRevokeList(params){
    return request({
        url: '/content/myRevokeList',
        method: 'get',
        params
    })
}
// 获取我的收藏
export function getMyCollectList(params){
    return request({
        url: '/content/myCollectList',
        method: 'get',
        params
    })
}
// 获取我的发布
export function getMyReleaseList(params){
    return request({
        url: '/content/myReleaseList',
        method: 'get',
        params
    })
}
// 投递内容
export function pushContent(data){
    return request({
        url: '/content/pushContent',
        method: 'post',
        data
    })
}
// 更新静态
export function refreshStatic() {
    return request({
        url: '/content/refreshStatic',
        method: 'post',
    })
}
// 获取历史版本
export function hisVersionList(params){
    return request({
        url: '/content/hisVersionList',
        method: 'get',
        params
    })
}
//恢复历史版本
export function hisVersionRestore(data) {
    return request({
        url: '/content/hisVersionRestore',
        method: 'post',
        data,
    })
}
//删除历史版本
export function hisVersionDelete(data) {
    return request({
        url: '/content/hisVersionDelete',
        method: 'delete',
        data
    })
}
//对比历史版本
export function hisVersionCompare(data) {
    return request({
        url: '/content/hisVersionCompare',
        method: 'post',
        data,
    })
}
//对比历史版本与当前内容
export function hisVersionCompareWithCur(data) {
    return request({
        url: '/content/hisVersionCompareWithCur',
        method: 'post',
        data,
    })
}
// 保存修改（待处理退稿）
export function saveContent(data) {
    return request({
        url: '/content/saveContent',
        method: 'post',
        data
    })
}
// 保存编辑(审核中文章) is_pass: [0|1]是否保存并通过
export function saveUnderReview(data) {
    return request({
        url: '/content/saveUnderReview',
        method: 'post',
        data
    })
}
// 重新发布（待处理退稿）
export function addAgain(data) {
    return request({
        url: '/content/addAgain',
        method: 'post',
        data
    })
}
// 删除稿件（待处理退稿）
export function articleRejectDelete(data) {
    return request({
        url: '/audit/articleRejectDelete',
        method: 'post',
        data
    })
}
// 获取操作日志
export function hisLogList(params) {
    return request({
        url: '/content/hisLogList',
        method: 'get',
        params
    })
}
// 获取审核日志
export function auditLogList(params) {
    return request({
        url: '/content/auditLogList',
        method: 'get',
        params
    })
}
// 获取审核日志详情
export function auditLogDetailById(params) {
    return request({
        url: '/content/auditLogDetailById',
        method: 'get',
        params
    })
}
// 转载内容
export function articleReprint(data) {
    return request({
        url: '/content/articleReprint',
        method: 'post',
        data
    })
}
// 投递内容
export function articleDeliver(data) {
    return request({
        url: '/content/articleDeliver',
        method: 'post',
        data
    })
}
// 复制内容
export function articleCopy(data) {
    return request({
        url: '/content/articleCopy',
        method: 'post',
        data
    })
}
// url检测
export function textCheckUrl(data) {
    return request({
        url: '/content/textCheckUrl',
        method: 'post',
        data
    })
}
// url 转存
export function copyUrl(data) {
    return request({
        url: '/content/copyUrl',
        method: 'post',
        data
    })
}
// 获取栏目统计
export function getCategoryContentStatistics(params) {
    return request({
        url: '/content/categoryContentStatistics',
        method: 'get',
        params
    })
}
// 获取审核时的发布表单
export function getAuditReleaseForm(params) {
  return request({
      url: '/content/getAuditReleaseForm',
      method: 'get',
      params
  })
}
// 网络采集
export function netWorkCollect(data) {
    return request({
        url: '/content/netWorkCollect',
        method: 'post',
        data
    })
}

// 获取样式列表
export function getStyle(params) {
    return request({
        url: '/content/getStyles',
        method: 'get',
        params
    })
}
// 获取样式详情
export function getStyleDetail(params) {
    return request({
        url: '/content/getStyleDetail',
        method: 'get',
        params
    })
}
// 修改样式
export function editStyle(data) {
    return request({
        url: '/content/editStyle',
        method: 'post',
        data
    })
}
// 删除样式
export function deleteStyle(data) {
    return request({
        url: 'content/deleteStyle',
        method: 'delete',
        data
    })
}
// 添加样式
export function addStyle(data) {
    return request({
        url: '/content/addStyle',
        method: 'post',
        data
    })
}
//获取模板标签
export function getTemplateTags() {
    return request({
        url: '/content/getTemplateTags',
        method: 'get',
    })
}
//添加模板标签
export function addTemplateTag(data) {
    return request({
        url: '/content/addTemplateTag',
        method: 'post',
        data
    })
}
// 更新索引
export function updateIndex(data) {
    return request({
        url: '/content/updateIndex',
        method: 'post',
        data
    })
}
// 批量导出文章列表
export function exportArticleTemplate(data) {
    return request({
        url: '/content/exportArticleTemplate',
        method: 'post',
        data
    })
}
// 批量导入文章列表
export function batchImportArticle(data) {
    return request({
        url: '/content/batchImportArticle',
        method: 'post',
        data
    })
}
// 根据图标url获取图片原图
export function getOriginImg(params) {
    return request({
        url: '/content/getOriginImg',
        method: 'get',
        params
    })
}
 /******************************************************************************* */
// 视频上传
export function insertVideo(data) {
    return request({
        url: '/station/api/video/insert',
        method: 'post',
        data
    })
}
// 视频分页查询
export function getVideoPage(params) {
    return request({
        url: '/station/api/video/selectPage',
        method: 'get',
        params
    })
}
// 获取内容数据概览
export function getContentDashboard(params) {
    return request({
        url: '/station/api/referenceData/dashboard',
        method: 'get',
        params
    })
}
// 获取内容列表
export function getContentPage(data) {
    return request({
        url: '/station/api/referenceData/selectPage',
        method: 'post',
        data
    })
}
// 添加草稿内容
export function insertDraft(data) {
    return request({
        url: '/station/api/referenceData/insertDraft',
        method: 'post',
        data
    })
}
// 添加内容
export function insertContent(data) {
    return request({
        url: '/station/api/referenceData/insert',
        method: 'post',
        data
    })
}
// 修改内容
export function updateContent(data) {
    return request({
        url: '/station/api/referenceData/update',
        method: 'post',
        data
    })
}
// 删除内容
export function deleteContent(data) {
    return request({
        url: '/station/api/referenceData/delete',
        method: 'post',
        data
    })
}
// 预览内容
export function checkPreview(data) {
    return request({
        url: '/station/api/referenceData/checkPreview',
        method: 'post',
        data
    })
}
// 获取内容详情
export function getContentDetail(params) {
    return request({
        url: '/station/api/referenceData/selectByCatIdAndDataId',
        method: 'get',
        params
    })
}
// 获取内容详情
export function getContentDetailPlus(params) {
    return request({
        url: '/station/api/referenceData/selectByCatIdAndDataIdPlus',
        method: 'get',
        params
    })
}
// 根据栏目id获取内容状态分类统计
export function getContentStatistics(params) {
    return request({
        url: '/station/api/referenceData/statistics',
        method: 'get',
        params
    })
}
// 批量查内容详情
export function getContentDetails(data) {
    return request({
        url: '/station/api/referenceData/selectList',
        method: 'post',
        data
    })
}
// 分页查询待审核
export function getAuditingPage(params) {
    return request({
        url: '/station/api/referenceData/selectAuditingPage',
        method: 'get',
        params
    })
}
// word导入
export function insertContentByImport(data) {
    return request({
        url: '/station/api/referenceData/import',
        method: 'post',
        data
    })
}
// 修改无需审核的属性
export function updateSystemData(data) {
    return request({
        url: '/station/api/referenceData/updateSystemData',
        method: 'post',
        data
    })
}
// 批量修改无需审核的属性
export function batchUpdateSystemData(data) {
    return request({
        url: '/station/api/referenceData/batchUpdateSystemData',
        method: 'post',
        data
    })
}
// 移动内容到其它栏目
export function moveContent(data) {
    return request({
        url: '/station/api/referenceData/move',
        method: 'post',
        data
    })
}
// 批量移动内容到其它栏目
export function batchMoveContent(data) {
    return request({
        url: '/station/api/referenceData/batchMove',
        method: 'post',
        data
    })
}
// 收藏内容
export function collectContent(data) {
    return request({
        url: '/station/api/referenceData/collect',
        method: 'post',
        data
    })
}
// 批量收藏内容
export function batchCollectContent(data) {
    return request({
        url: '/station/api/referenceData/batchCollect',
        method: 'post',
        data
    })
}
// 复制内容
export function copyContent(data) {
    return request({
        url: '/station/api/referenceData/copy',
        method: 'post',
        data
    })
}
// 批量复制内容
export function batchCopyContent(data) {
    return request({
        url: '/station/api/referenceData/batchCopy',
        method: 'post',
        data
    })
}
// 内容排序
export function updateSort(data) {
    return request({
        url: '/station/api/referenceData/updateSort',
        method: 'post',
        data
    })
}
// 一键排序
export function resetSort(data) {
    return request({
        url: '/station/api/referenceData/resetSort',
        method: 'post',
        data
    })
}
// 我的发布
export function getMyPublish(params) {
    return request({
        url: '/station/api/referenceData/selectPublish',
        method: 'get',
        params
    })
}
// 我的收藏
export function getMyCollect(params) {
    return request({
        url: '/station/api/referenceData/selectCollect',
        method: 'get',
        params
    })
}
// 同步站点内容到es搜索引擎
export function syncSiteContentToEs(params) {
    return request({
        url: '/station/api/referenceData/dataSynchronize',
        method: 'get',
        params
    })
}